//
//  FKBannerView.h
//  FKBannerViewDemo
//
//  Created by 云眼科技 on 16/7/22.
//  Copyright © 2016年 CloudEyes. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, FKBannerViewStyle) {
    FKBannerViewStyleDefault = 0,
    FKBannerViewStyleTransform,
    FKBannerViewStyleAnimation
} NS_ENUM_AVAILABLE_IOS(7_0) ;


#pragma mark - datasource & delegate define

@class FKBannerView;

@protocol FKBannerViewDatasource <NSObject>

@required
-(NSInteger)numberOfItemsInBannerView:(FKBannerView *)bannerView;
-(UIView *)bannerView:(FKBannerView *)bannerView viewForItemAtIndex:(NSInteger)index;
@end

@protocol FKBannerViewDelegate <NSObject>
@optional
-(void)bannerView:(FKBannerView *)bannerView didSelectedItemAtIndex:(NSInteger)index;

@end


#pragma mark - bannerView
@interface FKBannerView : UIView

//delegate & datasource
@property (nonatomic, weak) id<FKBannerViewDatasource> datasource;
@property (nonatomic, weak) id<FKBannerViewDelegate> delegate;

@property (nonatomic, assign) FKBannerViewStyle style;

@property (nonatomic, strong, nullable) UIImage *placeHolderImage;// can be nil, if nil, will show the lightGrayColor 
@property (nonatomic, assign) NSTimeInterval timeInterval; //default is 2 seconds.

//pageControl
@property (nonatomic, assign) BOOL hidePageControl;
@property (nonatomic, strong, nullable) UIColor *indicatorColor;
@property (nonatomic, strong, nullable) UIColor *currentIndicatorColor;


-(instancetype)initWithFrame:(CGRect)frame; //default. will add a pageControl.
-(instancetype)initWithFrame:(CGRect)frame style:(FKBannerViewStyle)style; //will be done soon.

-(void)reloadData;


@end
















NS_ASSUME_NONNULL_END